<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/7/18 0018
  Time: 9:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>24点小游戏</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <!-- 新 Bootstrap5 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css">

    <!--  popper.min.js 用于弹窗、提示、下拉菜单 -->
    <script src="https://cdn.staticfile.org/popper.js/2.9.3/umd/popper.min.js"></script>

    <!-- 最新的 Bootstrap5 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.min.js"></script>
</head>
<body>
<h3 align="center">越算越聪明的24点小游戏</h3>
<form action="/input">
    <table border="0" class="table">
        <tr>
            <th>a</th>
            <th>b</th>
            <th>c</th>
            <th>d</th>
        </tr>
        <tr>
            <td><label>
                <input value="${a}" name="a">
            </label></td>
            <td><label>
                <input value="${b}" name="b">
            </label></td>
            <td><label>
                <input value="${c}" name="c">
            </label></td>
            <td><label>
                <input value="${d}" name="d">
            </label></td>
        </tr>
        <tr>
            <td>
                <input type="submit" value="输入数据" class="btn btn-info">
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/start" class="btn btn-primary">随机产生</a>
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/solve" class="btn btn-warning">快速求解</a>
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/save" class="btn btn-danger">存数据库</a>
            </td>


        </tr>

    </table>
    <h3 align="center">计算状态:${status}</h3>
</form>


<table class=" table table-striped">
    <th>
        <td>id</td>
        <td>numbers</td>
        <td>solution</td>
    </th>
    <c:forEach items="${cs}" var="cc" varStatus="st">
        <tr>
            <td>${cc.id}</td>
            <td>${cc.numbers}</td>
            <td>${cc.solution}</td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
